/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view;

import database.DokumentTabel;
import database.DosenTabel;
import java.awt.BorderLayout;
import java.util.ArrayList;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTable;
import model.Dokument;
import model.Dosen;

/**
 *
 * @author Adell
 */
public class PanelLihatTabelDosen extends JPanel {

    private JTable tabelDosen;
    private JLabel labelDosen;
    private ArrayList<Dosen> data;

    public PanelLihatTabelDosen(ArrayList<Dosen> data) {

        this.data = data;

        setLayout(new BorderLayout());
        labelDosen = new JLabel("Label Dosen");
        labelDosen.setHorizontalAlignment(JLabel.CENTER);
        add(labelDosen, BorderLayout.NORTH);

        tabelDosen = new JTable();
        tabelDosen.setModel(new DosenTabel(data));
        add(tabelDosen, BorderLayout.CENTER);
        setVisible(true);

    }

    public ArrayList<Dosen> getData() {
        return data;
    }

    public void setData(ArrayList<Dosen> data) {
        this.data = data;
    }
}
